package algotithm.interview.gensheixueGo.test5;

/**
 * @author zhouyanxiang
 * @Date 2021-04-2021/4/15-16:21
 */
import java.util.Scanner;

public class Main {

    static final int N = 10005;
    static int m,n;
    static int[] prime = new int[N];
    static boolean[] check = new boolean[N];

    static void init(){
        int temp;
        check[1]=true;
        for(int i=2;i<=n;++i){
            if(!check[i]) {
                prime[++prime[0]]=i;
            }
            for(int j=1;j<=prime[0];++j){
                temp=i*prime[j];
                if(temp>n) {
                    break;
                }
                check[temp]=true;
                if(i%prime[j]==0) {
                    break;
                }
            }
        }
    }

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        m=2;
        n=scanner.nextInt();
        init();
        int count=0;
        for(int i=m;i<=n;++i){
            if(!check[i]) {
                count++;
            }
        }
        System.out.println(count);
    }

}